package com.changgou.goods.pojo;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.List;

@Table(name = "tb_category")
public class Categories {
    private Integer id;
    private String name;
    @Column(name = "parent_id")
    private Integer parentId;
    private List<Categories> child = new ArrayList<>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public List<Categories> getChild() {
        return child;
    }

    public void setChild(List<Categories> child) {
        this.child = child;
    }
}
